import request from '@/utils/request';

// 新闻列表
export const Newsfromdata = params => {
  return request({
    url: '/Article/article-list',
    method: 'get',
    params
  })
};

// 删除新闻
export const delectfromdata = data => {
  return request({
    url: '/Article/article-delete',
    method: 'post',
    data
  })
};

// 编辑新闻
export const editfromdata = data => {
  return request({
    url: '/article/edit',
    method: 'post',
    data:data
  })
};
// 新闻详情
export const getArticleDetails = params => {
  return request({
    url: '/Article/article-details',
    method: 'get',
    params
  })
};

// 添加新闻
export const addfromdata = data => {
  return request({
    url: '/article/add',
    method: 'post',
    data:data
  })
};
// 置顶新闻
export const pinnedArticle = data => {
  return request({
    url: '/Article/article-top',
    method: 'post',
    data
  })
};
// 新增新闻
export const addArticle = (url, data) => {
  return request({
    url,
    method: 'post',
    data
  })
};

const group_price_import = process.env.VUE_APP_BASE_API + "/upload/upload_file";
export { group_price_import }